const key = "userInfo"
export const getUserInfo = () => {
    try {
        return JSON.parse(uni.getStorageSync(key))
    } catch (error) {
        return {}
    }
}

export const setUserInfo = (userInfo) => {
    uni.setStorageSync(key, JSON.stringify(userInfo))
}

export const removeUserInfo = () => {
    uni.removeStorageSync(key)
}
